import http from "@/api/http";

//获取语录
export const postAnaList = (params: any) => {
  return http.post(`/ana/list`, params);
};

//删除语录
export const deleteAna = (id: string) => {
  return http.delete(`/ana/delete/${id}`);
};

//新增语录
export const addAna = (params: string) => {
  return http.post(`/ana/add`, params);
};
//批量删除
export const deleteAnaBatch = (id: string) => {
  return http.post(`/ana/deleteBatch`, id);
};

//导出数据
export const exportAna = () => {
  return http.get(`/ana/export`, { responseType: "blob" });
};

//编辑语录
export const putAna = (params: string) => {
  return http.put(`/ana/update`, params);
};

//导出模板
export const getAna = () => {
  return http.get(`/ana/template`, { responseType: "blob" });
};
//导入数据批量
export const postAnaLists = (params: any) => {
  return http.post(`/ana/import`, params, {
    headers: {
      "Content-Type": "multipart/form-data"
    }
  });
};
